package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import service.AdminService;
import service.impl.AdminServiceImpl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
public class setTypeController {
    AdminService adminService = new AdminServiceImpl();
    @RequestMapping("/setType")
    public String showSetTypePage(HttpSession session) {
        String name = (String) session.getAttribute("username");
        if (adminService.isadmin(name))
            return "setType";
        else return "main";
    }


}
